﻿using System;
using System.Collections;
using System.Collections.Generic;
using UnityEngine;

/// <summary>
/// Creates build logs that need to be seen at runtime.
/// </summary>
[Serializable]
public class PackedPlayModeBuildLogs
{
    /// <summary>
    /// A container for build logs that need to be seen at runtime.
    /// </summary>
    [Serializable]
    public struct RuntimeBuildLog
    {
        /// <summary>
        /// The type of log being stored.  This will determine how the message is portrayed at runtime.
        /// </summary>
        public LogType Type;
        /// <summary>
        /// The contents of the build log.
        /// </summary>
        public string Message;

        /// <summary>
        /// Create a container for build logs that need to be seen at runtime.
        /// </summary>
        /// <param name="type">The type of log.</param>
        /// <param name="message">The message to be logged.</param>
        public RuntimeBuildLog(LogType type, string message)
        {
            Type = type;
            Message = message;
        }
    }

    [SerializeField] List<RuntimeBuildLog> m_RuntimeBuildLogs = new List<RuntimeBuildLog>();
    /// <summary>
    /// List of logs that need to appear in the runtime that was generated by the build.
    /// </summary>
    public List<RuntimeBuildLog> RuntimeBuildLogs
    {
        get { return m_RuntimeBuildLogs; }
        set { m_RuntimeBuildLogs = value; }
    }
}
